In [1]:
import json
import math
import time
import copy
import random
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from wsbignn import WSBiGNN
import matplotlib.pyplot as plt
from matplotlib import pyplot as plt
torch.autograd.set_detect_anomaly(True)
Out[1]:
<torch.autograd.anomaly_mode.set_detect_anomaly at 0x7f4188763a00>
In [2]:
#1. set parameters
#2. visualization
#3. compute the loss
#4. initialize user embeddings
#5. compute adjacency matrix based on mobility and web search
#6. train
#7. compute the Recall and NDCG
#8. main
#9. save

1: set parameters¶

In [3]:
print (torch.cuda.is_available())
device = torch.device("cuda:0")
random_seed = 42
random.seed(random_seed)
torch.manual_seed(random_seed)
torch.cuda.manual_seed(random_seed)
r = random.random
True
In [4]:
x_day, y_day = 3, 1  
case = str(x_day) + "_" + str(y_day)
train_ratio, validate_ratio = 0.70, 0.10
top_k, npr = 3, 5
num_epochs, batch_size, learning_rate = 200, 2, 0.001
hid_dim = 32
hid_dim_cons = 32
hyper_param = {"n_e": num_epochs, "b_s": batch_size, "l_r": learning_rate, "top_k": top_k}
In [5]:
root_path = "/home/umni2/a/umnilab/users/xue120/umni4/2023_web_mobility_summer"+\
                "/1_data_check/data_feature_generation/"
file_name = root_path + "feature_" + str(x_day) + "_" + str(y_day)
train_path = file_name + "/train.json"
vali_path = file_name + "/validate.json"
test_path = file_name + "/test.json"
sampled_user_location_path = file_name + "/sampled_user_location.json"
member_path = root_path + "member/"

2: visualization¶

In [6]:
def visual_train_loss(e_losses):
    plt.figure(figsize=(4,3), dpi=300)
    x = range(len(e_losses))
    y1 = copy.copy(e_losses)
    plt.plot(x,y1, linewidth=1,  label="train")
    plt.legend()
    plt.title('Loss decline on training data')
    plt.xlabel('Epoch')
    plt.ylabel('Loss')
    plt.savefig(case + '/' + 'train_loss.png',bbox_inches = 'tight')
    plt.show()
    
def visual_vali_test_loss(recall_vali, recall_test, ndcg_vali, ndcg_test):
    plt.figure(figsize=(4,3), dpi=300)
    x = range(len(recall_vali))    
    plt.plot(x, recall_vali, linewidth=1, label="Recall_validate")
    plt.plot(x, ndcg_vali, linewidth=1, label="NDCG_validate")
    plt.plot(x, recall_test, linewidth=1, label="Recall_test")
    plt.plot(x, ndcg_test, linewidth=1, label="NDCG_test")
    plt.legend()
    plt.title('Recall/NDCG on validate/test sets')
    plt.xlabel('Epoch')
    plt.ylabel('Recall@3, NDCG@3')
    plt.savefig(case + '/' + 'vali_test_recall_ndcg.png',bbox_inches = 'tight')
    plt.show()

3: compute the loss¶

In [7]:
#compute the cross entropy loss
#input1:  gnn_output   dim = (batch, y_day, U, V).
#input2:  real_link    dim = (batch, y_day, n_edge, 2).
#input3:  criterion
#inputs 4,5,6:  n_user, n_loc, npr
#output: average loss for batch*y_day terms
def compute_loss(gnn_output, real_link, criterion, n_user, n_loc, npr):
    batch, y_day = gnn_output.size()[0], gnn_output.size()[1]
    loss = torch.tensor([0.0])
    all_edge = [str(u)+"_"+str(v) for u in range(n_user) for v in range(n_loc)]
    
    for i in range(batch):
        for j in range(y_day):
            predicted, real = gnn_output[i][j], real_link[i][j] 
            #positive edges
            str_real = [str(int(real[k][0])) + "_" + str(int(real[k][1])) for k in range(len(real))]
            num_real = len(real) - str_real.count(str(-1)+"_"+str(-1))
            set_pos = set(str_real[0: num_real])
            all_pos = list(set_pos)
            n_pos = len(all_pos)
            
            #sample negative edges
            all_neg = list(set(all_edge) - set_pos)
            n_sampled_neg = int(n_pos * npr)
            sampled_neg = random.sample(all_neg, n_sampled_neg)
            
            #prepare for loss computing
            pos = [[int(item.split("_")[0]), int(item.split("_")[1])] for item in all_pos] 
            neg = [[int(item.split("_")[0]), int(item.split("_")[1])] for item in sampled_neg] 
            pos_idx = [pos[k][0]*n_loc + pos[k][1] for k in range(n_pos)]
            neg_idx = [neg[k][0]*n_loc + neg[k][1] for k in range(n_sampled_neg)]
            hat_1_pos = torch.take(predicted, torch.tensor(pos_idx)) 
            hat_1_neg = torch.take(predicted, torch.tensor(neg_idx))
            hat_1 = torch.sigmoid(torch.cat((hat_1_pos, hat_1_neg)).unsqueeze(dim=0))  
            hat = torch.log(torch.transpose(torch.cat((1.0-hat_1, hat_1), dim=0),1,0))  #NLLLOSS
            
            real = torch.tensor([1]*n_pos + [0]*n_sampled_neg)
            loss += criterion(hat, real)
    loss = loss*1.0/(batch*y_day)
    return loss

4: initialize user embeddings¶

In [8]:
#define user embeddings based on POI embeddings.
#input1: x_loc             dim = (V, 200)
#input2: x_mob_batch      dim = (batch, x_day, n_m, 2)
#input3: x_text_batch         dim = (batch, x_day, n_t, 2)
#input4: n_user         
#output: x_user                dim = (batch, U, 200)
def compute_user_embedding(x_loc, x_mob_batch, x_text_batch, n_user):
    x_user = torch.zeros((0, n_user, 200), device=device)
    x_m_t_batch = torch.cat([x_mob_batch, x_text_batch], dim=2)  #dim = (batch, x_day, n_m+n_t, 2)
    batch = x_m_t_batch.size()[0]
    
    for i in range(batch):
        #initialize 
        user_sum_embed = torch.zeros((n_user, 200), device=device)
        user_ave_embed = torch.zeros((n_user, 200), device=device)
        user_count_embed, user_with_edge = [0]*n_user, list()

        #update user embeddings
        link_record = x_m_t_batch[i][0]  #extract the first day
        for link in link_record:
            if link[0] != -1:
                user, loc = link[0], link[1] 
                user_with_edge.append(user)              
                user_count_embed[user] = user_count_embed[user] + 1     
                user_sum_embed[user] = user_sum_embed[user] + x_loc[loc]
            else:
                break
                
        set_user_with_edge = set(user_with_edge)
        for user in set_user_with_edge:
            user_ave_embed[user] = user_sum_embed[user]/user_count_embed[user]
        
        #update the user embedding for other users with mobility records on the first day
        #compute the average embedding  
        n_user_with_edge = len(set_user_with_edge)
        ave_embedding = torch.sum(user_ave_embed, dim=0)/(1.0*n_user_with_edge)
        
        #define the embeddings for remaining users as the average embedding 
        set_remain = set(range(n_user))-set_user_with_edge
        dict_remain = {user:0 for user in set_remain}
        for user in dict_remain:
            user_ave_embed[user] = ave_embedding
        
        #concatenate different batches
        x_user = torch.cat([x_user, user_ave_embed.unsqueeze(0)],dim=0)
    return x_user                                        

5: compute adjacency matrix based on mobility and web search¶

In [9]:
#input1: x_mob_batch       dim = (batch, x_day, n_m, 2)
#input2: x_text_batch      dim = (batch, x_day, n_t, 2)
#inputs3,4: u_user, n_loc
#output1: x_adj            dim = (batch, x_day, n_user+2*n_loc, n_user+2*n_loc)
def convert_to_adj(x_mob_batch, x_text_batch, n_user, n_loc):
    time_1 = time.time()
    batch, x_day = x_mob_batch.size()[0], x_mob_batch.size()[1]
    adj_dim = n_user + 2*n_loc
    adj = torch.zeros((batch, x_day, adj_dim, adj_dim), device=device)
    
    for i in range(batch):
        x_mob_record, x_text_record = x_mob_batch[i], x_text_batch[i]
        for j in range(x_day):
            x_mob_one_day, x_text_one_day = x_mob_record[j], x_text_record[j]
            #extract mob edges
            for link in x_mob_one_day:
                if link[0] != -1:
                    user, loc = link[0], link[1]
                    n_idx = n_user + loc
                    adj[i][j][user][n_idx] = adj[i][j][user][n_idx] + 1 
                    adj[i][j][n_idx][user] = adj[i][j][user][n_idx]
                else:
                    break
            
            #extract text edges
            for link in x_text_one_day:
                if link[0] != -1:
                    user, loc = link[0], link[1] 
                    n_idx = n_user + n_loc + loc
                    adj[i][j][user][n_idx] = adj[i][j][user][n_idx] + 1
                    adj[i][j][n_idx][user] = adj[i][j][user][n_idx]
                else:
                    break
    return adj

6: train¶

In [10]:
#6.1: one training epoch   
#output: the average loss, model         
def train_epoch(model, opt, criterion, train, hyper_param_dict, y_day, npr, loss_batch_all):
    time_1 = time.time()
    model.train()
    losses = list()
    
    n_user, n_loc, b_s = hyper_param["n_user"], hyper_param["n_loc"], hyper_param["b_s"]
    x_u_v, x_poi, train_x_mob, train_x_text, train_y_mob =\
        train["u_v"].to(device), train["x_poi"].to(device), train["x_mob"],\
            train["x_text"], train["y_mob"]
    n = train_x_mob.size()[0] 
    print ("# batch: ", int(n/b_s))
    
    for i in range(0, n-b_s, b_s):
        time_1 = time.time()          
        x_mob_batch, x_text_batch, y_mob_batch = train_x_mob[i:i + b_s], train_x_text[i:i + b_s], train_y_mob[i:i + b_s]    
    
        opt.zero_grad()
        
        loss = torch.zeros(1, dtype=torch.float)
        x_user = compute_user_embedding(x_poi, x_mob_batch, x_text_batch, n_user)  #4.
        
        x_adj = convert_to_adj(x_mob_batch, x_text_batch, n_user, n_loc)                  #5. 
        
        model_output = model.run(x_u_v, x_poi, x_user.to(device), x_adj.to(device), b_s) 
        
        loss = compute_loss(model_output.cpu(), y_mob_batch, criterion, n_user, n_loc, npr)  #3.
        loss_batch_all.append(loss.data.numpy()[0])
        loss.backward()
        opt.step()
        losses.append(loss.data.numpy())  # sum over batches
        
        time2 = time.time()
        if i%20 == 0:
            print ("i_batch: ", i/b_s)
            print ("the loss is: ", loss.data.numpy()[0])
            print ("time for this batch: ", round(time2 - time_1,3))
            print ("-----------------a batch ends---------------")
    return sum(losses)/float(len(losses)+0.000001), model, loss_batch_all
In [11]:
#6.2
def train_process(train, vali, test, net, criterion, hyper_param, y_day, loss_batch_all):   
    e_losses_train = list()
    recall_vali, recall_test, ndcg_vali, ndcg_test = list(), list(), list(), list()
    l_r, n_e, b_s  = hyper_param["l_r"], hyper_param["n_e"], hyper_param["b_s"]

    opt = optim.Adam(net.parameters(), l_r, betas = (0.9,0.999), weight_decay = 0.0001)
    opt_scheduler = torch.optim.lr_scheduler.MultiStepLR(opt, milestones=[150]) 
    print ("# epochs: ", n_e)
    print ("------------------------------------------------------------")        
    time_start = time.time()
    no_improve_in_n = 0
    
    #prepare for vali and test
    print ("start preparing for vali and test")
    vali_u_v, vali_x_poi, vali_x_user, vali_x_adj, vali_y_real = prepare_validate_test(vali, hyper_param)
    print ("finish vali")
    test_u_v, test_x_poi, test_x_user, test_x_adj, test_y_real = prepare_validate_test(test, hyper_param)
    print ("finish test")
           
    for i in range(n_e):
        print ("i_epoch: ", i)
        print ("----------------an epoch starts-------------------")
        time1 = time.time()
        n_train = len(train["x_mob"])
        number_list = copy.copy(list(range(n_train)))
        random.shuffle(number_list, random = r)
        shuffle_idx = torch.tensor(number_list)
        
        #train one epoch
        train_shuffle = dict()
        train_shuffle["u_v"] = train["u_v"]
        train_shuffle["x_poi"], train_shuffle["x_mob"] = train["x_poi"], train["x_mob"][shuffle_idx]
        train_shuffle["x_text"], train_shuffle["y_mob"] = train["x_text"][shuffle_idx], train["y_mob"][shuffle_idx]
        
        loss, net, loss_batch_all =  train_epoch(net, opt, criterion, train_shuffle, hyper_param, y_day, npr, loss_batch_all)
        
        opt_scheduler.step() 
        
        loss = float(loss)
        print ("train loss for this epoch: ", round(loss, 6))
        e_losses_train.append(loss)
        visual_train_loss(e_losses_train)
        
        print ("----------------validate-------------------")
        val_all_recall, val_all_ndcg, val_ave_recall, val_ave_ndcg =\
                validate_test(net, hyper_param, \
                              vali_u_v, vali_x_poi, vali_x_user, vali_x_adj, vali_y_real, False)
        
        print ("----------------test-------------------")
        test_all_recall, test_all_ndcg, test_ave_recall, test_ave_ndcg =\
               validate_test(net, hyper_param,\
                             test_u_v, test_x_poi, test_x_user, test_x_adj, test_y_real, False)
        
        if len(recall_vali) > 0:
            past_max = np.max(recall_vali)
        else:
            past_max = 0.0
        recall_vali.append(val_ave_recall)
        recall_test.append(test_ave_recall)
        ndcg_vali.append(val_ave_ndcg)
        ndcg_test.append(test_ave_ndcg)
        visual_vali_test_loss(recall_vali, recall_test, ndcg_vali, ndcg_test)
        
        #store
        performance = {"recall_val": recall_vali, "recall_test": recall_test, \
                       "ndcg_val": ndcg_vali,"ndcg_test": ndcg_test,\
                        "e_losses_train": e_losses_train}
        subfile =  open(case + '/' + 'performance'+'.json','w')
        json.dump(performance, subfile)
        subfile.close()
                    
        #early stop
        if val_ave_recall < past_max:
            no_improve_in_n = no_improve_in_n + 1
        else:
            no_improve_in_n = 0
        if no_improve_in_n == 30:
            print ("Early stop at the " + str(i+1) + "-th epoch")
            return e_losses_train, net, loss_batch_all
        time2 = time.time()
        print ("running time for this epoch: ", time2 - time1)
        time_now = time.time()
        print ("running time until now: ", time_now - time_start)
        print ("-------------------------an epoch ends ---------------------------")
    return e_losses_train, net, loss_batch_all
In [12]:
#6.3
def model_train(train, vali, test, hyper_param, x_day, y_day, member):
    with torch.autograd.set_detect_anomaly(True):       
        loss_batch_all = list()
        model = WSBiGNN(hid_dim, hid_dim_cons, x_day, member).to(device)          
        criterion = nn.NLLLoss() 
        print ("start train_process")
        e_losses, trained_model, loss_batch_all = train_process(train, vali, test, model,\
                                                criterion, hyper_param, y_day, loss_batch_all)  
        return e_losses, trained_model, loss_batch_all

7: compute the Recall and NDCG¶

In [13]:
#7.1: compute Recall@K, NDCG@K
#input1:  gnn_output   dim = (batch, y_day, U, V)
#input2:  real_link    dim = (batch, y_day, n_edge, 2)
#inputs3,4:  n_user, n_loc
#input5: top_k
#output: Recall@K, NDCG@K
def compute_recall_ndcg(gnn_output, real_link, n_user, n_loc, top_k):
    batch, y_day = gnn_output.size()[0], gnn_output.size()[1]
    recall_all = [[0.0 for j in range(y_day)] for i in range(batch)] 
    ndcg_all = [[0.0 for j in range(y_day)] for i in range(batch)] 
    
    for i in range(batch):
        for j in range(y_day):
            recall_user, ndcg_user = {}, {}
            predicted, real = gnn_output[i][j].tolist(), real_link[i][j] 
            
            #1. construct the real mobility
            real_list, real_dict = {user: [] for user in range(n_user)}, {user: {} for user in range(n_user)}
            for k in range(len(real)):
                edge = real[k]
                user, poi = int(edge[0]), int(edge[1])
                if user > -1:
                    real_list[user].append(poi)
                else:
                    break
            for user in real_list:
                real_dict[user] = set(real_list[user])
            
            #2. compute Recall@K, NDCG@K
            for user in real_dict:
                real_poi = real_dict[user]
                len_real_poi = len(real_poi)
                if len_real_poi > 0:
                    predict_row = predicted[user]                 #[0,0,12,1,5]
                    largest_k_idx = np.argsort(predict_row)[::-1] #[2,4,3,1,0]
                    top_k_idx = largest_k_idx[0: top_k]            #[2,4,3]
                    
                    #compute Recall
                    predict_top_k = set(top_k_idx)
                    recall_user[user] = len(predict_top_k.intersection(real_poi))*1.0/len_real_poi
                    
                    #compute NDCG
                    weight = [1.0/(math.log(k+2)/math.log(2.0)) for k in range(top_k)]
                    #denominator
                    if len_real_poi < top_k:
                         best_rank = [1.0]*len_real_poi + [0.0]*(top_k-len_real_poi)
                    else:
                         best_rank = [1.0]*top_k        
                    #numerator  
                    predict_rank = [0.0]* top_k
                    for idx in range(len(top_k_idx)):
                        if top_k_idx[idx] in real_poi:
                            predict_rank[idx] = 1.0
                    #NDCG
                    ndcg_user[user] = float(np.dot(weight, predict_rank)/np.dot(weight, best_rank))
            
            #3. compute the average Recall@k, average NDCG@k.
            recall_all[i][j] = float(np.mean(list(recall_user.values())))
            ndcg_all[i][j] = float(np.mean(list(ndcg_user.values())))
    ave_recall, ave_ndcg = np.mean(recall_all), np.mean(ndcg_all)
    print ("ave Recall", ave_recall)
    print ("ave NDCG", ave_ndcg)
    return recall_all, ndcg_all, ave_recall, ave_ndcg

#7.2: evaluate the trained model on validation or test 
def prepare_validate_test(vali_test, hyper_param):
    n_user, n_loc = hyper_param["n_user"], hyper_param["n_loc"]
    u_v, x_poi, x_mob, x_text, y_real =\
        vali_test["u_v"].to(device), vali_test["x_poi"].to(device), vali_test["x_mob"].to(device), \
            vali_test["x_text"].to(device), vali_test["y_mob"]
    x_user = compute_user_embedding(x_poi, x_mob, x_text, n_user)
    x_adj = convert_to_adj(x_mob, x_text, n_user, n_loc)
    return u_v, x_poi, x_user, x_adj, y_real

def validate_test(trained_model, hyper_param, u_v, x_poi, x_user, x_adj, y_real, output=False):  
    n_user, n_loc = hyper_param["n_user"], hyper_param["n_loc"]
    top_k, b_s = hyper_param["top_k"], y_real.size()[0]
    
    y_hat = trained_model.run(u_v, x_poi, x_user, x_adj, b_s)
    all_recall, all_ndcg, ave_recall, ave_ndcg =\
        compute_recall_ndcg(y_hat.cpu(), y_real, n_user, n_loc, top_k)
    
    if output == True:
        return all_recall, all_ndcg, ave_recall, ave_ndcg, y_hat.cpu(), y_real
    else:
        return all_recall, all_ndcg, ave_recall, ave_ndcg

8: train¶

In [14]:
#8.1: tensorize
def tensorize(train_vali_test):
    result = dict()
    result["u_v"] = torch.tensor(train_vali_test["u_v"]) 
    result["x_poi"] = torch.tensor(train_vali_test["x_poi"])     
    result["x_mob"] = torch.tensor(train_vali_test["x_mob"]) 
    result["x_text"] = torch.tensor(train_vali_test["x_text"]) 
    result["y_mob"] = torch.tensor(train_vali_test["y_mob"]) 
    return result
In [15]:
#8.2: load the data
train = tensorize(json.load(open(train_path)))
vali = tensorize(json.load(open(vali_path)))
test = tensorize(json.load(open(test_path)))
sampled_user_location = json.load(open(sampled_user_location_path))
sampled_user_location["n_user"] = len(sampled_user_location["u"])
sampled_user_location["n_loc"] = len(sampled_user_location["p"])

u_list, p_list = sampled_user_location["u"], sampled_user_location["p"]
hyper_param["n_user"], hyper_param["n_loc"] = len(u_list), len(p_list)

#supernode
member_dict = json.load(open(member_path + "member_" + case + ".json"))
#sg, s_ng, ns_g, ns_ng
member = torch.tensor([member_dict["s_g"], member_dict["s_ng"],\
                       member_dict["ns_g"], member_dict["ns_ng"]], device=device)
In [16]:
#8.3: model 
e_losses, trained_model, loss_batch_all = model_train(train, vali, test, hyper_param,\
                                                      x_day, y_day, member)
start train_process
# epochs:  200
------------------------------------------------------------
start preparing for vali and test
finish vali
finish test
i_epoch:  0
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  6.4551945
time for this batch:  1.543
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  3.755136
time for this batch:  0.69
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  2.5719948
time for this batch:  0.863
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  1.9302506
time for this batch:  0.752
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  1.5922208
time for this batch:  0.841
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  1.3612849
time for this batch:  0.815
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  1.1941475
time for this batch:  0.733
-----------------a batch ends---------------
train loss for this epoch:  2.461898
----------------validate-------------------
ave Recall 0.05368904185149889
ave NDCG 0.0337704240876557
----------------test-------------------
ave Recall 0.054915484236194356
ave NDCG 0.035655956352420165
running time for this epoch:  57.43118739128113
running time until now:  138.89907503128052
-------------------------an epoch ends ---------------------------
i_epoch:  1
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  1.1746511
time for this batch:  0.7
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  1.080836
time for this batch:  0.921
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  1.0046064
time for this batch:  0.896
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.94327974
time for this batch:  0.887
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.897148
time for this batch:  0.774
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.8503902
time for this batch:  0.677
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.805946
time for this batch:  0.708
-----------------a batch ends---------------
train loss for this epoch:  0.957759
----------------validate-------------------
ave Recall 0.05610499590587491
ave NDCG 0.035701805382371825
----------------test-------------------
ave Recall 0.04938265198985753
ave NDCG 0.030326825385713338
running time for this epoch:  55.80727291107178
running time until now:  194.70639157295227
-------------------------an epoch ends ---------------------------
i_epoch:  2
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.7980334
time for this batch:  0.812
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.753665
time for this batch:  0.839
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.7115643
time for this batch:  0.921
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.66628265
time for this batch:  0.734
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.620415
time for this batch:  0.771
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.56804866
time for this batch:  0.83
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.51838344
time for this batch:  0.887
-----------------a batch ends---------------
train loss for this epoch:  0.661197
----------------validate-------------------
ave Recall 0.288437187068438
ave NDCG 0.23156701137572863
----------------test-------------------
ave Recall 0.29041033676236844
ave NDCG 0.2376682720280735
running time for this epoch:  54.376497983932495
running time until now:  249.08293318748474
-------------------------an epoch ends ---------------------------
i_epoch:  3
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.5074045
time for this batch:  0.634
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.46755174
time for this batch:  0.687
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.44130313
time for this batch:  0.85
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.39473566
time for this batch:  0.642
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.36091825
time for this batch:  0.832
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.35502803
time for this batch:  0.789
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.3492634
time for this batch:  0.77
-----------------a batch ends---------------
train loss for this epoch:  0.405487
----------------validate-------------------
ave Recall 0.3305790774085357
ave NDCG 0.2750656450922976
----------------test-------------------
ave Recall 0.34476933067015003
ave NDCG 0.2811795565622066
running time for this epoch:  53.84571123123169
running time until now:  302.9286868572235
-------------------------an epoch ends ---------------------------
i_epoch:  4
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.34005392
time for this batch:  0.671
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.33186483
time for this batch:  0.824
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.30827478
time for this batch:  0.774
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.30169624
time for this batch:  0.789
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.3071944
time for this batch:  0.689
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.27922165
time for this batch:  0.751
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.28880686
time for this batch:  0.847
-----------------a batch ends---------------
train loss for this epoch:  0.305799
----------------validate-------------------
ave Recall 0.40879327315960223
ave NDCG 0.34427866277067065
----------------test-------------------
ave Recall 0.3776212176272128
ave NDCG 0.3137447478277305
running time for this epoch:  55.4896023273468
running time until now:  358.4183394908905
-------------------------an epoch ends ---------------------------
i_epoch:  5
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.27199918
time for this batch:  0.707
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.28424206
time for this batch:  0.76
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.27821907
time for this batch:  0.837
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.28847945
time for this batch:  0.846
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.2569798
time for this batch:  0.839
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.24410877
time for this batch:  0.809
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.24174228
time for this batch:  0.847
-----------------a batch ends---------------
train loss for this epoch:  0.26704
----------------validate-------------------
ave Recall 0.5000978296428309
ave NDCG 0.4307470140387966
----------------test-------------------
ave Recall 0.4604443742362477
ave NDCG 0.3892602843378973
running time for this epoch:  56.5573947429657
running time until now:  414.975781917572
-------------------------an epoch ends ---------------------------
i_epoch:  6
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.2384956
time for this batch:  0.76
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.23460299
time for this batch:  0.709
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.23878485
time for this batch:  0.842
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.23671111
time for this batch:  0.686
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.23429698
time for this batch:  0.597
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.21659416
time for this batch:  0.891
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.23017412
time for this batch:  0.897
-----------------a batch ends---------------
train loss for this epoch:  0.237792
----------------validate-------------------
ave Recall 0.5607250803927045
ave NDCG 0.48509447639224107
----------------test-------------------
ave Recall 0.5274689032710835
ave NDCG 0.4490028107729718
running time for this epoch:  53.61614942550659
running time until now:  468.59197640419006
-------------------------an epoch ends ---------------------------
i_epoch:  7
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.21872656
time for this batch:  0.638
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.22193438
time for this batch:  0.671
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.21363527
time for this batch:  0.856
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.22720781
time for this batch:  0.75
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.23271182
time for this batch:  0.93
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.22286707
time for this batch:  0.791
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.21802622
time for this batch:  0.69
-----------------a batch ends---------------
train loss for this epoch:  0.217623
----------------validate-------------------
ave Recall 0.6071526048866328
ave NDCG 0.5223009693597155
----------------test-------------------
ave Recall 0.5763561720289139
ave NDCG 0.491704560799077
running time for this epoch:  53.2183198928833
running time until now:  521.8103394508362
-------------------------an epoch ends ---------------------------
i_epoch:  8
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.20270714
time for this batch:  0.644
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.21831611
time for this batch:  0.868
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.19441384
time for this batch:  0.824
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.20143858
time for this batch:  0.811
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.18687466
time for this batch:  0.801
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.19653967
time for this batch:  0.892
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.20029435
time for this batch:  0.681
-----------------a batch ends---------------
train loss for this epoch:  0.20372
----------------validate-------------------
ave Recall 0.6311408379853402
ave NDCG 0.5415007154841043
----------------test-------------------
ave Recall 0.6076228670842508
ave NDCG 0.5182579165007891
running time for this epoch:  53.49553442001343
running time until now:  575.3059256076813
-------------------------an epoch ends ---------------------------
i_epoch:  9
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.19944397
time for this batch:  0.759
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.18174942
time for this batch:  0.794
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.2077645
time for this batch:  0.797
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.18548653
time for this batch:  0.886
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.20753393
time for this batch:  0.895
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.19007814
time for this batch:  0.781
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.18403035
time for this batch:  0.845
-----------------a batch ends---------------
train loss for this epoch:  0.193176
----------------validate-------------------
ave Recall 0.6448427629558929
ave NDCG 0.5526212653612738
----------------test-------------------
ave Recall 0.6237174572719483
ave NDCG 0.5307814694638581
running time for this epoch:  55.263845443725586
running time until now:  630.5698175430298
-------------------------an epoch ends ---------------------------
i_epoch:  10
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.18055405
time for this batch:  0.706
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.18223241
time for this batch:  0.845
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.19415668
time for this batch:  0.87
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.17730601
time for this batch:  0.794
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.17956828
time for this batch:  0.797
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.19472349
time for this batch:  0.845
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.17059126
time for this batch:  0.786
-----------------a batch ends---------------
train loss for this epoch:  0.185011
----------------validate-------------------
ave Recall 0.6514761257453677
ave NDCG 0.5581900832816792
----------------test-------------------
ave Recall 0.6367385080140016
ave NDCG 0.5399485186378935
running time for this epoch:  56.95112133026123
running time until now:  687.5209803581238
-------------------------an epoch ends ---------------------------
i_epoch:  11
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.18795809
time for this batch:  0.656
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.17791082
time for this batch:  0.814
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.16275384
time for this batch:  0.858
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.17775634
time for this batch:  0.934
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.19743541
time for this batch:  0.841
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.17691952
time for this batch:  0.874
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.19490728
time for this batch:  0.883
-----------------a batch ends---------------
train loss for this epoch:  0.179005
----------------validate-------------------
ave Recall 0.65586641176295
ave NDCG 0.5637920019408097
----------------test-------------------
ave Recall 0.6492148809490397
ave NDCG 0.5468288685817475
running time for this epoch:  56.003705739974976
running time until now:  743.5247311592102
-------------------------an epoch ends ---------------------------
i_epoch:  12
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.19013026
time for this batch:  0.717
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.16436192
time for this batch:  0.996
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.17698018
time for this batch:  0.752
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1722727
time for this batch:  0.853
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.16646677
time for this batch:  0.715
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.17331076
time for this batch:  0.741
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.16032392
time for this batch:  0.791
-----------------a batch ends---------------
train loss for this epoch:  0.17184
----------------validate-------------------
ave Recall 0.6579758391602053
ave NDCG 0.563541572720673
----------------test-------------------
ave Recall 0.649355533314717
ave NDCG 0.5465566331214913
running time for this epoch:  54.90040874481201
running time until now:  798.4251832962036
-------------------------an epoch ends ---------------------------
i_epoch:  13
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.17815803
time for this batch:  0.722
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.16826315
time for this batch:  0.723
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.15520367
time for this batch:  0.672
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.16384402
time for this batch:  0.813
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.17958632
time for this batch:  0.822
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.1654749
time for this batch:  0.798
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.17442921
time for this batch:  0.712
-----------------a batch ends---------------
train loss for this epoch:  0.168378
----------------validate-------------------
ave Recall 0.6628545417698173
ave NDCG 0.5644505952278138
----------------test-------------------
ave Recall 0.6565384762610394
ave NDCG 0.5514360451129652
running time for this epoch:  55.094356060028076
running time until now:  853.5195815563202
-------------------------an epoch ends ---------------------------
i_epoch:  14
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.15213479
time for this batch:  0.663
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.16763364
time for this batch:  0.786
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.15441036
time for this batch:  0.649
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.16156323
time for this batch:  0.856
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1599458
time for this batch:  0.719
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.16529642
time for this batch:  0.872
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.16771287
time for this batch:  0.813
-----------------a batch ends---------------
train loss for this epoch:  0.164242
----------------validate-------------------
ave Recall 0.6663954837965447
ave NDCG 0.5663363253792901
----------------test-------------------
ave Recall 0.6551637736995234
ave NDCG 0.5501209318662446
running time for this epoch:  55.094462156295776
running time until now:  908.6140856742859
-------------------------an epoch ends ---------------------------
i_epoch:  15
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.16138297
time for this batch:  0.791
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.15650374
time for this batch:  0.767
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.18089455
time for this batch:  0.88
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.15433237
time for this batch:  0.861
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.16972646
time for this batch:  0.839
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.16092125
time for this batch:  0.845
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15809527
time for this batch:  0.78
-----------------a batch ends---------------
train loss for this epoch:  0.161476
----------------validate-------------------
ave Recall 0.6660603634169504
ave NDCG 0.5646978412442254
----------------test-------------------
ave Recall 0.661612517781042
ave NDCG 0.5537280602072755
running time for this epoch:  56.313440799713135
running time until now:  964.9275758266449
-------------------------an epoch ends ---------------------------
i_epoch:  16
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.1485593
time for this batch:  0.684
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.15503794
time for this batch:  0.779
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.153061
time for this batch:  0.726
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.16278552
time for this batch:  0.793
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14916025
time for this batch:  0.799
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.1471301
time for this batch:  0.881
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15488176
time for this batch:  0.837
-----------------a batch ends---------------
train loss for this epoch:  0.159903
----------------validate-------------------
ave Recall 0.6742667199868164
ave NDCG 0.5709701057491189
----------------test-------------------
ave Recall 0.6544583394083653
ave NDCG 0.547849004484093
running time for this epoch:  55.33725905418396
running time until now:  1020.2648825645447
-------------------------an epoch ends ---------------------------
i_epoch:  17
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14612535
time for this batch:  0.683
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.15479812
time for this batch:  0.828
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.1614201
time for this batch:  0.737
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14187014
time for this batch:  0.734
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.15782937
time for this batch:  0.865
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.1668356
time for this batch:  0.727
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.158752
time for this batch:  0.732
-----------------a batch ends---------------
train loss for this epoch:  0.155843
----------------validate-------------------
ave Recall 0.6670180152553595
ave NDCG 0.5678688704716611
----------------test-------------------
ave Recall 0.658022389954054
ave NDCG 0.5508294766967299
running time for this epoch:  54.16564893722534
running time until now:  1074.4305768013
-------------------------an epoch ends ---------------------------
i_epoch:  18
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.15573815
time for this batch:  0.793
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13589683
time for this batch:  0.743
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.15623707
time for this batch:  0.775
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1355663
time for this batch:  0.796
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.17480075
time for this batch:  0.818
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.15791455
time for this batch:  0.814
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14965034
time for this batch:  0.887
-----------------a batch ends---------------
train loss for this epoch:  0.154104
----------------validate-------------------
ave Recall 0.6702468612741106
ave NDCG 0.5715092906071271
----------------test-------------------
ave Recall 0.6561338566045861
ave NDCG 0.5512273137397495
running time for this epoch:  54.054386377334595
running time until now:  1128.4850380420685
-------------------------an epoch ends ---------------------------
i_epoch:  19
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.15692846
time for this batch:  1.039
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.15028283
time for this batch:  0.853
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.16471505
time for this batch:  0.772
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.16425753
time for this batch:  0.698
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14109239
time for this batch:  0.893
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14754628
time for this batch:  0.639
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.16674279
time for this batch:  0.676
-----------------a batch ends---------------
train loss for this epoch:  0.152401
----------------validate-------------------
ave Recall 0.6710969353208145
ave NDCG 0.5698893528451427
----------------test-------------------
ave Recall 0.6547153788248964
ave NDCG 0.5487324362395171
running time for this epoch:  51.35201382637024
running time until now:  1179.8371176719666
-------------------------an epoch ends ---------------------------
i_epoch:  20
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.16082115
time for this batch:  0.722
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.1491655
time for this batch:  0.745
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14060366
time for this batch:  0.651
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13469094
time for this batch:  0.719
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.15780821
time for this batch:  0.745
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.16266394
time for this batch:  0.764
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14675513
time for this batch:  0.649
-----------------a batch ends---------------
train loss for this epoch:  0.150565
----------------validate-------------------
ave Recall 0.6716183401208135
ave NDCG 0.5702700984657088
----------------test-------------------
ave Recall 0.6590191213975873
ave NDCG 0.5526714469568244
running time for this epoch:  48.604774951934814
running time until now:  1228.4419338703156
-------------------------an epoch ends ---------------------------
i_epoch:  21
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13249636
time for this batch:  0.662
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.15219894
time for this batch:  0.711
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.15665156
time for this batch:  0.767
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14776511
time for this batch:  0.753
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1588685
time for this batch:  0.706
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.16633266
time for this batch:  0.797
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15496787
time for this batch:  0.732
-----------------a batch ends---------------
train loss for this epoch:  0.149046
----------------validate-------------------
ave Recall 0.6689290437496777
ave NDCG 0.5684750941271486
----------------test-------------------
ave Recall 0.6568107704434438
ave NDCG 0.5482115248863947
running time for this epoch:  50.13195753097534
running time until now:  1278.5739486217499
-------------------------an epoch ends ---------------------------
i_epoch:  22
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14911914
time for this batch:  0.807
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13526687
time for this batch:  1.047
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.1565008
time for this batch:  0.615
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14187005
time for this batch:  0.971
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14242068
time for this batch:  0.705
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.15078694
time for this batch:  0.739
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.1447745
time for this batch:  0.778
-----------------a batch ends---------------
train loss for this epoch:  0.149391
----------------validate-------------------
ave Recall 0.6704827483702939
ave NDCG 0.5694171231785216
----------------test-------------------
ave Recall 0.6579665222705497
ave NDCG 0.5486791750842369
running time for this epoch:  53.281179666519165
running time until now:  1331.855176448822
-------------------------an epoch ends ---------------------------
i_epoch:  23
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14413916
time for this batch:  0.831
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.15666679
time for this batch:  0.661
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.15121913
time for this batch:  0.681
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14237258
time for this batch:  0.962
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14461538
time for this batch:  0.779
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.15344039
time for this batch:  0.869
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15378663
time for this batch:  0.891
-----------------a batch ends---------------
train loss for this epoch:  0.148349
----------------validate-------------------
ave Recall 0.6734282881001176
ave NDCG 0.568696690808703
----------------test-------------------
ave Recall 0.6543316594430627
ave NDCG 0.5473988905460261
running time for this epoch:  53.04296946525574
running time until now:  1384.8982093334198
-------------------------an epoch ends ---------------------------
i_epoch:  24
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14112756
time for this batch:  0.875
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12669885
time for this batch:  0.643
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13849351
time for this batch:  0.661
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.15585722
time for this batch:  0.762
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14807087
time for this batch:  0.701
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.16001497
time for this batch:  0.838
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13632245
time for this batch:  0.745
-----------------a batch ends---------------
train loss for this epoch:  0.146554
----------------validate-------------------
ave Recall 0.6749379364892568
ave NDCG 0.5732173118275624
----------------test-------------------
ave Recall 0.6544711961237198
ave NDCG 0.5488939730941818
running time for this epoch:  53.21556782722473
running time until now:  1438.1138439178467
-------------------------an epoch ends ---------------------------
i_epoch:  25
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14850679
time for this batch:  0.892
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13789146
time for this batch:  0.789
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13301235
time for this batch:  0.741
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13608257
time for this batch:  0.708
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14917874
time for this batch:  0.601
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14423673
time for this batch:  0.816
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15719259
time for this batch:  0.826
-----------------a batch ends---------------
train loss for this epoch:  0.145543
----------------validate-------------------
ave Recall 0.6707103375765268
ave NDCG 0.5682815113069427
----------------test-------------------
ave Recall 0.6569985446473618
ave NDCG 0.5500438299470252
running time for this epoch:  51.31193923950195
running time until now:  1489.4258286952972
-------------------------an epoch ends ---------------------------
i_epoch:  26
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13950372
time for this batch:  0.644
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13202007
time for this batch:  0.715
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.16440617
time for this batch:  0.754
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.15478985
time for this batch:  0.705
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1388107
time for this batch:  0.68
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14053532
time for this batch:  0.645
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14076677
time for this batch:  0.651
-----------------a batch ends---------------
train loss for this epoch:  0.145688
----------------validate-------------------
ave Recall 0.6641812044147309
ave NDCG 0.5647445121866982
----------------test-------------------
ave Recall 0.6578042398363724
ave NDCG 0.5502917261982471
running time for this epoch:  51.048216342926025
running time until now:  1540.4741237163544
-------------------------an epoch ends ---------------------------
i_epoch:  27
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14600506
time for this batch:  0.806
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.1290971
time for this batch:  0.903
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13217218
time for this batch:  0.68
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14549771
time for this batch:  0.731
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14311382
time for this batch:  0.727
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.1460993
time for this batch:  0.911
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.1363998
time for this batch:  0.721
-----------------a batch ends---------------
train loss for this epoch:  0.145357
----------------validate-------------------
ave Recall 0.6697085140655687
ave NDCG 0.5674219870388759
----------------test-------------------
ave Recall 0.6550733133325539
ave NDCG 0.5463233977697902
running time for this epoch:  53.98778319358826
running time until now:  1594.461982011795
-------------------------an epoch ends ---------------------------
i_epoch:  28
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.15203127
time for this batch:  0.698
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13743782
time for this batch:  0.664
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12231363
time for this batch:  0.671
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14454755
time for this batch:  0.919
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13937405
time for this batch:  0.849
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.15381551
time for this batch:  0.852
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14735875
time for this batch:  0.602
-----------------a batch ends---------------
train loss for this epoch:  0.143264
----------------validate-------------------
ave Recall 0.6695700685586188
ave NDCG 0.5661091881195577
----------------test-------------------
ave Recall 0.6505998630066977
ave NDCG 0.5458074293108086
running time for this epoch:  53.51718521118164
running time until now:  1647.9792213439941
-------------------------an epoch ends ---------------------------
i_epoch:  29
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12664238
time for this batch:  0.756
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.14315107
time for this batch:  0.762
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12930563
time for this batch:  0.774
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13590772
time for this batch:  0.654
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13466127
time for this batch:  0.586
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13155152
time for this batch:  0.656
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14609787
time for this batch:  0.782
-----------------a batch ends---------------
train loss for this epoch:  0.143164
----------------validate-------------------
ave Recall 0.671848504836634
ave NDCG 0.567988886854256
----------------test-------------------
ave Recall 0.6590493431774357
ave NDCG 0.5506938034998144
running time for this epoch:  50.9627902507782
running time until now:  1698.9420669078827
-------------------------an epoch ends ---------------------------
i_epoch:  30
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13325784
time for this batch:  0.85
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13510136
time for this batch:  0.706
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14898752
time for this batch:  0.637
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.154565
time for this batch:  0.863
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13793293
time for this batch:  0.872
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.16277137
time for this batch:  0.598
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14514935
time for this batch:  0.745
-----------------a batch ends---------------
train loss for this epoch:  0.142206
----------------validate-------------------
ave Recall 0.6682384563816616
ave NDCG 0.56501555904148
----------------test-------------------
ave Recall 0.6605441423149919
ave NDCG 0.5472989992134276
running time for this epoch:  51.39018678665161
running time until now:  1750.3323166370392
-------------------------an epoch ends ---------------------------
i_epoch:  31
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.123626426
time for this batch:  0.737
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13921532
time for this batch:  0.734
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14113581
time for this batch:  0.653
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.15941031
time for this batch:  0.821
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1503382
time for this batch:  1.025
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.15162799
time for this batch:  0.746
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15870678
time for this batch:  0.77
-----------------a batch ends---------------
train loss for this epoch:  0.141576
----------------validate-------------------
ave Recall 0.6722575385003878
ave NDCG 0.5673885876380342
----------------test-------------------
ave Recall 0.6553174846964686
ave NDCG 0.5446262199505156
running time for this epoch:  52.00571918487549
running time until now:  1802.3381140232086
-------------------------an epoch ends ---------------------------
i_epoch:  32
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14397788
time for this batch:  0.702
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.1339129
time for this batch:  0.685
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14422213
time for this batch:  0.747
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13902041
time for this batch:  0.684
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.15156305
time for this batch:  0.752
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13264874
time for this batch:  0.708
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14247462
time for this batch:  0.678
-----------------a batch ends---------------
train loss for this epoch:  0.142054
----------------validate-------------------
ave Recall 0.672941817786917
ave NDCG 0.5721138355496171
----------------test-------------------
ave Recall 0.6624535822642746
ave NDCG 0.5537501326638341
running time for this epoch:  49.760125398635864
running time until now:  1852.0983164310455
-------------------------an epoch ends ---------------------------
i_epoch:  33
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13392112
time for this batch:  0.812
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13663408
time for this batch:  0.793
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.15225321
time for this batch:  0.855
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.132799
time for this batch:  0.594
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13766326
time for this batch:  0.886
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14672768
time for this batch:  0.813
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14056462
time for this batch:  0.627
-----------------a batch ends---------------
train loss for this epoch:  0.141399
----------------validate-------------------
ave Recall 0.6692470074913787
ave NDCG 0.5645445678537072
----------------test-------------------
ave Recall 0.6529929404921752
ave NDCG 0.5462208550326141
running time for this epoch:  50.27941846847534
running time until now:  1902.3777947425842
-------------------------an epoch ends ---------------------------
i_epoch:  34
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14265929
time for this batch:  0.752
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.14688732
time for this batch:  0.644
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13841371
time for this batch:  0.666
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14645328
time for this batch:  0.742
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1544339
time for this batch:  0.825
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14307845
time for this batch:  0.922
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14397702
time for this batch:  0.876
-----------------a batch ends---------------
train loss for this epoch:  0.140961
----------------validate-------------------
ave Recall 0.6691969933240303
ave NDCG 0.565837648670329
----------------test-------------------
ave Recall 0.6623868610501877
ave NDCG 0.5544691295598819
running time for this epoch:  54.3826744556427
running time until now:  1956.760513305664
-------------------------an epoch ends ---------------------------
i_epoch:  35
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13612689
time for this batch:  0.655
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13766019
time for this batch:  0.657
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13739687
time for this batch:  0.762
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.10762192
time for this batch:  0.612
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13358015
time for this batch:  0.717
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13942927
time for this batch:  0.646
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14700495
time for this batch:  0.626
-----------------a batch ends---------------
train loss for this epoch:  0.139817
----------------validate-------------------
ave Recall 0.6701055927921666
ave NDCG 0.5676777674780583
----------------test-------------------
ave Recall 0.6592349789387273
ave NDCG 0.5502452284965225
running time for this epoch:  45.172913789749146
running time until now:  2001.9335329532623
-------------------------an epoch ends ---------------------------
i_epoch:  36
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14123252
time for this batch:  0.581
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13919634
time for this batch:  0.606
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.1427258
time for this batch:  0.58
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.12651744
time for this batch:  0.682
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14034876
time for this batch:  0.662
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14243889
time for this batch:  0.606
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.137736
time for this batch:  0.589
-----------------a batch ends---------------
train loss for this epoch:  0.141179
----------------validate-------------------
ave Recall 0.6648144569602208
ave NDCG 0.5645268936094441
----------------test-------------------
ave Recall 0.6603103384982554
ave NDCG 0.5491759656506919
running time for this epoch:  44.98262000083923
running time until now:  2046.916222333908
-------------------------an epoch ends ---------------------------
i_epoch:  37
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13578638
time for this batch:  0.569
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13459414
time for this batch:  0.574
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13164148
time for this batch:  0.618
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.15062937
time for this batch:  0.659
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.143253
time for this batch:  0.736
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.15114138
time for this batch:  0.653
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13428396
time for this batch:  0.626
-----------------a batch ends---------------
train loss for this epoch:  0.139467
----------------validate-------------------
ave Recall 0.6636418030053968
ave NDCG 0.5625760598721443
----------------test-------------------
ave Recall 0.6567062037031755
ave NDCG 0.5495102108012694
running time for this epoch:  44.06864380836487
running time until now:  2090.9849066734314
-------------------------an epoch ends ---------------------------
i_epoch:  38
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.11557686
time for this batch:  0.613
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.14098814
time for this batch:  0.647
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.1446417
time for this batch:  0.613
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1408126
time for this batch:  0.584
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14281458
time for this batch:  0.65
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.16148569
time for this batch:  0.651
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14226165
time for this batch:  0.638
-----------------a batch ends---------------
train loss for this epoch:  0.138753
----------------validate-------------------
ave Recall 0.6701774146578328
ave NDCG 0.5668760874378678
----------------test-------------------
ave Recall 0.6622800518786164
ave NDCG 0.5522893658492317
running time for this epoch:  44.56523251533508
running time until now:  2135.5502033233643
-------------------------an epoch ends ---------------------------
i_epoch:  39
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13176706
time for this batch:  0.665
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12549706
time for this batch:  0.692
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.1314267
time for this batch:  0.699
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14059675
time for this batch:  0.647
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13170731
time for this batch:  0.628
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.15132067
time for this batch:  0.703
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.12542741
time for this batch:  0.65
-----------------a batch ends---------------
train loss for this epoch:  0.13906
----------------validate-------------------
ave Recall 0.6664719281962783
ave NDCG 0.5674759974516995
----------------test-------------------
ave Recall 0.6576343321913741
ave NDCG 0.5489996841771528
running time for this epoch:  46.08642268180847
running time until now:  2181.6367263793945
-------------------------an epoch ends ---------------------------
i_epoch:  40
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.122823715
time for this batch:  0.747
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12501101
time for this batch:  0.724
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13248357
time for this batch:  0.737
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13866705
time for this batch:  0.701
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13504085
time for this batch:  0.569
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13733456
time for this batch:  0.696
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14797288
time for this batch:  0.709
-----------------a batch ends---------------
train loss for this epoch:  0.13886
----------------validate-------------------
ave Recall 0.6680740766801878
ave NDCG 0.5675610058107569
----------------test-------------------
ave Recall 0.6597769629028298
ave NDCG 0.5515143583851834
running time for this epoch:  46.72116446495056
running time until now:  2228.3579416275024
-------------------------an epoch ends ---------------------------
i_epoch:  41
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12768906
time for this batch:  0.542
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.14262351
time for this batch:  0.657
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13413423
time for this batch:  0.613
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1474539
time for this batch:  0.699
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13238269
time for this batch:  0.553
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14182132
time for this batch:  0.665
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13720334
time for this batch:  0.647
-----------------a batch ends---------------
train loss for this epoch:  0.137589
----------------validate-------------------
ave Recall 0.6672130298414379
ave NDCG 0.5664064323255937
----------------test-------------------
ave Recall 0.6534532421480362
ave NDCG 0.5495934796188758
running time for this epoch:  44.99138855934143
running time until now:  2273.349418401718
-------------------------an epoch ends ---------------------------
i_epoch:  42
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12870733
time for this batch:  0.626
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12638284
time for this batch:  0.563
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14208354
time for this batch:  0.813
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.12797447
time for this batch:  0.61
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1629552
time for this batch:  0.711
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13960592
time for this batch:  0.664
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15463471
time for this batch:  0.658
-----------------a batch ends---------------
train loss for this epoch:  0.137578
----------------validate-------------------
ave Recall 0.6727698013522961
ave NDCG 0.5709486081091311
----------------test-------------------
ave Recall 0.6626148457674916
ave NDCG 0.5560698246181607
running time for this epoch:  43.98703169822693
running time until now:  2317.3365256786346
-------------------------an epoch ends ---------------------------
i_epoch:  43
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13446192
time for this batch:  0.553
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.14215711
time for this batch:  0.62
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12131637
time for this batch:  0.567
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1380943
time for this batch:  0.583
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13817298
time for this batch:  0.667
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.12947164
time for this batch:  0.74
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13767128
time for this batch:  0.646
-----------------a batch ends---------------
train loss for this epoch:  0.136525
----------------validate-------------------
ave Recall 0.6724146626513193
ave NDCG 0.5725381653184812
----------------test-------------------
ave Recall 0.6682552232232336
ave NDCG 0.5612470422623492
running time for this epoch:  43.3808012008667
running time until now:  2360.7173869609833
-------------------------an epoch ends ---------------------------
i_epoch:  44
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.11994261
time for this batch:  0.614
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13571706
time for this batch:  0.686
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.1358186
time for this batch:  0.618
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13514915
time for this batch:  0.56
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13354859
time for this batch:  0.591
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.15637895
time for this batch:  0.752
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13644725
time for this batch:  0.607
-----------------a batch ends---------------
train loss for this epoch:  0.136326
----------------validate-------------------
ave Recall 0.6723281595817545
ave NDCG 0.5689081931073179
----------------test-------------------
ave Recall 0.661693551192811
ave NDCG 0.5552231975467637
running time for this epoch:  43.502023220062256
running time until now:  2404.2194509506226
-------------------------an epoch ends ---------------------------
i_epoch:  45
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13171388
time for this batch:  0.621
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13059786
time for this batch:  0.491
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12295322
time for this batch:  0.566
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.16085574
time for this batch:  0.58
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13743426
time for this batch:  0.561
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13194972
time for this batch:  0.652
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13942605
time for this batch:  0.615
-----------------a batch ends---------------
train loss for this epoch:  0.136666
----------------validate-------------------
ave Recall 0.6731312072851539
ave NDCG 0.5725293499382256
----------------test-------------------
ave Recall 0.6651521031803808
ave NDCG 0.5580960161144373
running time for this epoch:  40.72740983963013
running time until now:  2444.9469175338745
-------------------------an epoch ends ---------------------------
i_epoch:  46
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.1365901
time for this batch:  0.628
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13741788
time for this batch:  0.478
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13482618
time for this batch:  0.651
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14465387
time for this batch:  0.598
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14623216
time for this batch:  0.599
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14186954
time for this batch:  0.514
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15106136
time for this batch:  0.654
-----------------a batch ends---------------
train loss for this epoch:  0.136697
----------------validate-------------------
ave Recall 0.670383923659115
ave NDCG 0.5676558999034157
----------------test-------------------
ave Recall 0.6593029285106621
ave NDCG 0.549848719172909
running time for this epoch:  41.40817070007324
running time until now:  2486.355129003525
-------------------------an epoch ends ---------------------------
i_epoch:  47
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13942671
time for this batch:  0.63
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.14002356
time for this batch:  0.516
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14855799
time for this batch:  0.568
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14118499
time for this batch:  0.634
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14180753
time for this batch:  0.594
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13712227
time for this batch:  0.618
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14097244
time for this batch:  0.532
-----------------a batch ends---------------
train loss for this epoch:  0.137024
----------------validate-------------------
ave Recall 0.6673075126830769
ave NDCG 0.5656718025318557
----------------test-------------------
ave Recall 0.6638256064393327
ave NDCG 0.5536749331551168
running time for this epoch:  40.942848920822144
running time until now:  2527.2980654239655
-------------------------an epoch ends ---------------------------
i_epoch:  48
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.15149954
time for this batch:  0.498
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12899332
time for this batch:  0.486
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.1513854
time for this batch:  0.575
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13876398
time for this batch:  0.478
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1370689
time for this batch:  0.668
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.12992525
time for this batch:  0.591
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14444086
time for this batch:  0.594
-----------------a batch ends---------------
train loss for this epoch:  0.136126
----------------validate-------------------
ave Recall 0.6708891444781044
ave NDCG 0.5655976397667541
----------------test-------------------
ave Recall 0.6592129360065506
ave NDCG 0.5499077288114314
running time for this epoch:  39.05191993713379
running time until now:  2566.35005569458
-------------------------an epoch ends ---------------------------
i_epoch:  49
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12144025
time for this batch:  0.529
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.1437082
time for this batch:  0.611
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14582443
time for this batch:  0.613
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13719304
time for this batch:  0.591
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1347489
time for this batch:  0.633
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13520697
time for this batch:  0.572
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13494672
time for this batch:  0.571
-----------------a batch ends---------------
train loss for this epoch:  0.135016
----------------validate-------------------
ave Recall 0.6715515249551189
ave NDCG 0.5694834227172593
----------------test-------------------
ave Recall 0.6609424407551086
ave NDCG 0.5549364069034587
running time for this epoch:  40.962045669555664
running time until now:  2607.3121938705444
-------------------------an epoch ends ---------------------------
i_epoch:  50
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14696412
time for this batch:  0.553
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13081051
time for this batch:  0.585
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12709083
time for this batch:  0.592
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13231604
time for this batch:  0.614
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13441089
time for this batch:  0.585
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14059773
time for this batch:  0.564
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14278321
time for this batch:  0.524
-----------------a batch ends---------------
train loss for this epoch:  0.135309
----------------validate-------------------
ave Recall 0.6754839494207725
ave NDCG 0.5687233026023568
----------------test-------------------
ave Recall 0.6672498640171579
ave NDCG 0.5604292372188545
running time for this epoch:  42.330549478530884
running time until now:  2649.642879486084
-------------------------an epoch ends ---------------------------
i_epoch:  51
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12291955
time for this batch:  0.527
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13226257
time for this batch:  0.615
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12780222
time for this batch:  0.603
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14536488
time for this batch:  0.587
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14745209
time for this batch:  0.693
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14574224
time for this batch:  0.643
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15427542
time for this batch:  0.579
-----------------a batch ends---------------
train loss for this epoch:  0.13609
----------------validate-------------------
ave Recall 0.6740952231779698
ave NDCG 0.5661803416182064
----------------test-------------------
ave Recall 0.6606425634110347
ave NDCG 0.5517984093743032
running time for this epoch:  44.69580578804016
running time until now:  2694.3387818336487
-------------------------an epoch ends ---------------------------
i_epoch:  52
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.11862414
time for this batch:  0.552
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.1402171
time for this batch:  0.592
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12325546
time for this batch:  0.656
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14117965
time for this batch:  0.608
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13427924
time for this batch:  0.644
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14321998
time for this batch:  0.619
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13860805
time for this batch:  0.584
-----------------a batch ends---------------
train loss for this epoch:  0.135227
----------------validate-------------------
ave Recall 0.6723247435286628
ave NDCG 0.5659721240671791
----------------test-------------------
ave Recall 0.6608948530533951
ave NDCG 0.5489118448992015
running time for this epoch:  42.36934423446655
running time until now:  2736.7081797122955
-------------------------an epoch ends ---------------------------
i_epoch:  53
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.14687702
time for this batch:  0.548
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12633064
time for this batch:  0.573
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12040923
time for this batch:  0.604
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.12721369
time for this batch:  0.65
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13841099
time for this batch:  0.64
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14283794
time for this batch:  0.575
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13967699
time for this batch:  0.585
-----------------a batch ends---------------
train loss for this epoch:  0.133322
----------------validate-------------------
ave Recall 0.6736377791786732
ave NDCG 0.5660888899414201
----------------test-------------------
ave Recall 0.6570137602354799
ave NDCG 0.548059371238735
running time for this epoch:  41.581591844558716
running time until now:  2778.2898688316345
-------------------------an epoch ends ---------------------------
i_epoch:  54
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12903045
time for this batch:  0.553
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13389927
time for this batch:  0.564
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12958437
time for this batch:  0.579
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.15084136
time for this batch:  0.578
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13473816
time for this batch:  0.582
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13719046
time for this batch:  0.589
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.1327137
time for this batch:  0.623
-----------------a batch ends---------------
train loss for this epoch:  0.134824
----------------validate-------------------
ave Recall 0.6693126781879227
ave NDCG 0.5665139926776868
----------------test-------------------
ave Recall 0.6574142328157015
ave NDCG 0.5481115504885931
running time for this epoch:  41.44312334060669
running time until now:  2819.7330679893494
-------------------------an epoch ends ---------------------------
i_epoch:  55
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12198973
time for this batch:  0.522
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12507361
time for this batch:  0.637
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13447425
time for this batch:  0.634
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13210286
time for this batch:  0.587
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1318819
time for this batch:  0.775
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.12742785
time for this batch:  0.758
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.1318487
time for this batch:  0.734
-----------------a batch ends---------------
train loss for this epoch:  0.134226
----------------validate-------------------
ave Recall 0.6638743445714366
ave NDCG 0.5639154263757014
----------------test-------------------
ave Recall 0.6540237266274778
ave NDCG 0.5480778708227143
running time for this epoch:  45.50716161727905
running time until now:  2865.2402811050415
-------------------------an epoch ends ---------------------------
i_epoch:  56
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13511698
time for this batch:  0.698
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13123998
time for this batch:  0.762
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12715408
time for this batch:  0.729
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.12570024
time for this batch:  0.626
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.12925221
time for this batch:  0.629
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13351373
time for this batch:  0.805
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13923815
time for this batch:  0.745
-----------------a batch ends---------------
train loss for this epoch:  0.133846
----------------validate-------------------
ave Recall 0.6692652910422199
ave NDCG 0.5671945913932063
----------------test-------------------
ave Recall 0.6567004332110731
ave NDCG 0.5492664602856597
running time for this epoch:  48.20149278640747
running time until now:  2913.4418499469757
-------------------------an epoch ends ---------------------------
i_epoch:  57
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.1270817
time for this batch:  0.701
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13031527
time for this batch:  0.535
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14615822
time for this batch:  0.638
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1446943
time for this batch:  0.573
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13821009
time for this batch:  0.604
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13085061
time for this batch:  0.583
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13273197
time for this batch:  0.569
-----------------a batch ends---------------
train loss for this epoch:  0.135139
----------------validate-------------------
ave Recall 0.672151514397165
ave NDCG 0.5681729492961425
----------------test-------------------
ave Recall 0.6597052889890709
ave NDCG 0.54796959335271
running time for this epoch:  42.06080150604248
running time until now:  2955.5027034282684
-------------------------an epoch ends ---------------------------
i_epoch:  58
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13818243
time for this batch:  0.535
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13534124
time for this batch:  0.634
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.11806026
time for this batch:  0.551
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.141565
time for this batch:  0.617
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13467482
time for this batch:  0.602
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.1332196
time for this batch:  0.61
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.1324912
time for this batch:  0.628
-----------------a batch ends---------------
train loss for this epoch:  0.133933
----------------validate-------------------
ave Recall 0.6665930564401834
ave NDCG 0.5637938861809845
----------------test-------------------
ave Recall 0.6559497409010283
ave NDCG 0.5463337391955574
running time for this epoch:  41.436739683151245
running time until now:  2996.9395525455475
-------------------------an epoch ends ---------------------------
i_epoch:  59
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.11662425
time for this batch:  0.546
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13532124
time for this batch:  0.596
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.15339954
time for this batch:  0.567
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.15091136
time for this batch:  0.584
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.12799136
time for this batch:  0.546
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.12799022
time for this batch:  0.594
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14294213
time for this batch:  0.553
-----------------a batch ends---------------
train loss for this epoch:  0.133963
----------------validate-------------------
ave Recall 0.6693842824613684
ave NDCG 0.5638121089631642
----------------test-------------------
ave Recall 0.6619028144195311
ave NDCG 0.551423831683687
running time for this epoch:  40.93689274787903
running time until now:  3037.8765263557434
-------------------------an epoch ends ---------------------------
i_epoch:  60
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13985255
time for this batch:  0.507
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13930416
time for this batch:  0.611
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12792815
time for this batch:  0.616
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1405336
time for this batch:  0.66
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14334613
time for this batch:  0.619
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13071397
time for this batch:  0.619
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13438961
time for this batch:  0.611
-----------------a batch ends---------------
train loss for this epoch:  0.134072
----------------validate-------------------
ave Recall 0.6672201288177069
ave NDCG 0.5654784911184513
----------------test-------------------
ave Recall 0.6617562569859237
ave NDCG 0.5542115498684241
running time for this epoch:  41.323227643966675
running time until now:  3079.19984292984
-------------------------an epoch ends ---------------------------
i_epoch:  61
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13473177
time for this batch:  0.558
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13895552
time for this batch:  0.63
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.123398624
time for this batch:  0.569
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13388811
time for this batch:  0.557
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13034338
time for this batch:  0.63
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13523442
time for this batch:  0.593
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13498002
time for this batch:  0.606
-----------------a batch ends---------------
train loss for this epoch:  0.132571
----------------validate-------------------
ave Recall 0.671581344550306
ave NDCG 0.5675245180437248
----------------test-------------------
ave Recall 0.6588489968273014
ave NDCG 0.5545751400315032
running time for this epoch:  41.2673397064209
running time until now:  3120.467225790024
-------------------------an epoch ends ---------------------------
i_epoch:  62
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13486752
time for this batch:  0.565
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.117840946
time for this batch:  0.613
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12507932
time for this batch:  0.596
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13084733
time for this batch:  0.603
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14219043
time for this batch:  0.601
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13319856
time for this batch:  0.597
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14644979
time for this batch:  0.596
-----------------a batch ends---------------
train loss for this epoch:  0.133158
----------------validate-------------------
ave Recall 0.6639083533105844
ave NDCG 0.5613508340060559
----------------test-------------------
ave Recall 0.6591269679017753
ave NDCG 0.5511116775995581
running time for this epoch:  41.62515449523926
running time until now:  3162.092423439026
-------------------------an epoch ends ---------------------------
i_epoch:  63
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.121539906
time for this batch:  0.552
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.1355544
time for this batch:  0.595
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12902734
time for this batch:  0.575
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13072772
time for this batch:  0.601
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13583143
time for this batch:  0.574
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14262146
time for this batch:  0.6
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15781334
time for this batch:  0.6
-----------------a batch ends---------------
train loss for this epoch:  0.133167
----------------validate-------------------
ave Recall 0.6652124839062751
ave NDCG 0.5614430738847825
----------------test-------------------
ave Recall 0.6516048159081422
ave NDCG 0.546959669311535
running time for this epoch:  40.41459679603577
running time until now:  3202.5070621967316
-------------------------an epoch ends ---------------------------
i_epoch:  64
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.1524623
time for this batch:  0.574
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12945266
time for this batch:  0.599
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12223812
time for this batch:  0.581
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13261992
time for this batch:  0.638
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1395796
time for this batch:  0.608
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14086327
time for this batch:  0.617
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13661732
time for this batch:  0.565
-----------------a batch ends---------------
train loss for this epoch:  0.133245
----------------validate-------------------
ave Recall 0.66398839300995
ave NDCG 0.5617207381843952
----------------test-------------------
ave Recall 0.6563213039633912
ave NDCG 0.5495107684636927
running time for this epoch:  40.99692249298096
running time until now:  3243.5040385723114
-------------------------an epoch ends ---------------------------
i_epoch:  65
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13212597
time for this batch:  0.545
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12587105
time for this batch:  0.64
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.10710281
time for this batch:  0.634
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13044685
time for this batch:  0.577
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1337158
time for this batch:  0.502
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14671502
time for this batch:  0.592
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14124359
time for this batch:  0.598
-----------------a batch ends---------------
train loss for this epoch:  0.133673
----------------validate-------------------
ave Recall 0.6717713244739608
ave NDCG 0.5672555383751693
----------------test-------------------
ave Recall 0.6626766394094142
ave NDCG 0.5528146828431673
running time for this epoch:  40.74333715438843
running time until now:  3284.2474670410156
-------------------------an epoch ends ---------------------------
i_epoch:  66
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13009338
time for this batch:  0.536
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13543938
time for this batch:  0.585
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12070784
time for this batch:  0.573
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.15605307
time for this batch:  0.636
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13549283
time for this batch:  0.596
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14260045
time for this batch:  0.598
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13790125
time for this batch:  0.595
-----------------a batch ends---------------
train loss for this epoch:  0.13275
----------------validate-------------------
ave Recall 0.672949381430763
ave NDCG 0.5680729490596725
----------------test-------------------
ave Recall 0.6584242391011224
ave NDCG 0.5485559137525862
running time for this epoch:  41.731393337249756
running time until now:  3325.9789316654205
-------------------------an epoch ends ---------------------------
i_epoch:  67
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13895923
time for this batch:  0.529
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12606736
time for this batch:  0.593
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13286069
time for this batch:  0.689
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.11492211
time for this batch:  0.588
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13169613
time for this batch:  0.607
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13844514
time for this batch:  0.587
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.142771
time for this batch:  0.592
-----------------a batch ends---------------
train loss for this epoch:  0.132251
----------------validate-------------------
ave Recall 0.6665226286779402
ave NDCG 0.5648902759404496
----------------test-------------------
ave Recall 0.6541647873871729
ave NDCG 0.5481370396870129
running time for this epoch:  41.45913028717041
running time until now:  3367.438150405884
-------------------------an epoch ends ---------------------------
i_epoch:  68
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12543373
time for this batch:  0.546
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13501261
time for this batch:  0.58
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.10877004
time for this batch:  0.618
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13023797
time for this batch:  0.62
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14624265
time for this batch:  0.538
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.12720425
time for this batch:  0.604
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13533852
time for this batch:  0.634
-----------------a batch ends---------------
train loss for this epoch:  0.13208
----------------validate-------------------
ave Recall 0.6651079178062149
ave NDCG 0.5634487180149542
----------------test-------------------
ave Recall 0.6582645708131027
ave NDCG 0.551669506313779
running time for this epoch:  40.31872367858887
running time until now:  3407.757003545761
-------------------------an epoch ends ---------------------------
i_epoch:  69
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.1291028
time for this batch:  0.548
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12832102
time for this batch:  0.596
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.11896944
time for this batch:  0.62
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1262183
time for this batch:  0.627
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14098549
time for this batch:  0.5
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.12417483
time for this batch:  0.481
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.12778431
time for this batch:  0.577
-----------------a batch ends---------------
train loss for this epoch:  0.132343
----------------validate-------------------
ave Recall 0.6616004972291759
ave NDCG 0.5593600906318443
----------------test-------------------
ave Recall 0.6574367507968019
ave NDCG 0.5461021003824171
running time for this epoch:  38.884825229644775
running time until now:  3446.6419451236725
-------------------------an epoch ends ---------------------------
i_epoch:  70
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.1320995
time for this batch:  0.479
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.143137
time for this batch:  0.5
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12315819
time for this batch:  0.519
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1298701
time for this batch:  0.493
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13161545
time for this batch:  0.497
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13985471
time for this batch:  0.497
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13400315
time for this batch:  0.509
-----------------a batch ends---------------
train loss for this epoch:  0.132959
----------------validate-------------------
ave Recall 0.6602517431176453
ave NDCG 0.5596458860748376
----------------test-------------------
ave Recall 0.6541554215131158
ave NDCG 0.5467592314064535
running time for this epoch:  34.9971981048584
running time until now:  3481.6392612457275
-------------------------an epoch ends ---------------------------
i_epoch:  71
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13643062
time for this batch:  0.526
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12168047
time for this batch:  0.477
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.14414507
time for this batch:  0.513
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.12383988
time for this batch:  0.515
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13763179
time for this batch:  0.479
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.1305691
time for this batch:  0.51
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.12728697
time for this batch:  0.495
-----------------a batch ends---------------
train loss for this epoch:  0.131195
----------------validate-------------------
ave Recall 0.6714272134137349
ave NDCG 0.5660173952534419
----------------test-------------------
ave Recall 0.6545141847014941
ave NDCG 0.546643187082683
running time for this epoch:  35.37409234046936
running time until now:  3517.013432264328
-------------------------an epoch ends ---------------------------
i_epoch:  72
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12830126
time for this batch:  0.611
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12674586
time for this batch:  0.621
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13043341
time for this batch:  0.556
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.12708528
time for this batch:  0.558
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.121352926
time for this batch:  0.572
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13213067
time for this batch:  0.611
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.15672982
time for this batch:  0.62
-----------------a batch ends---------------
train loss for this epoch:  0.131075
----------------validate-------------------
ave Recall 0.6676538625839197
ave NDCG 0.5662752408850888
----------------test-------------------
ave Recall 0.6555612161633536
ave NDCG 0.5468255814385783
running time for this epoch:  41.28895688056946
running time until now:  3558.3024826049805
-------------------------an epoch ends ---------------------------
i_epoch:  73
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.117299214
time for this batch:  0.563
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.126307
time for this batch:  0.597
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12914208
time for this batch:  0.593
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13963017
time for this batch:  0.577
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.14559191
time for this batch:  0.571
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.122718275
time for this batch:  0.609
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.12834106
time for this batch:  0.739
-----------------a batch ends---------------
train loss for this epoch:  0.131628
----------------validate-------------------
ave Recall 0.6660753764226778
ave NDCG 0.5659896751258124
----------------test-------------------
ave Recall 0.6564321925764329
ave NDCG 0.5473714082458201
running time for this epoch:  40.891708850860596
running time until now:  3599.1942570209503
-------------------------an epoch ends ---------------------------
i_epoch:  74
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13763234
time for this batch:  0.563
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12062025
time for this batch:  0.717
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12680122
time for this batch:  0.597
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13160048
time for this batch:  0.577
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.12789601
time for this batch:  0.611
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14020683
time for this batch:  0.565
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.14430381
time for this batch:  0.555
-----------------a batch ends---------------
train loss for this epoch:  0.130875
----------------validate-------------------
ave Recall 0.6688539605363211
ave NDCG 0.5634072626542452
----------------test-------------------
ave Recall 0.6578130977493277
ave NDCG 0.5494968553245554
running time for this epoch:  40.02163624763489
running time until now:  3639.215935230255
-------------------------an epoch ends ---------------------------
i_epoch:  75
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12069584
time for this batch:  0.543
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12406084
time for this batch:  0.591
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13533404
time for this batch:  0.637
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14386395
time for this batch:  0.619
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.12966727
time for this batch:  0.599
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.12911506
time for this batch:  0.603
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.12791108
time for this batch:  0.63
-----------------a batch ends---------------
train loss for this epoch:  0.131831
----------------validate-------------------
ave Recall 0.6713738215485605
ave NDCG 0.5655989365042033
----------------test-------------------
ave Recall 0.6606173288376685
ave NDCG 0.5507045790871418
running time for this epoch:  41.45550799369812
running time until now:  3680.6715500354767
-------------------------an epoch ends ---------------------------
i_epoch:  76
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.13094473
time for this batch:  0.56
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.14464201
time for this batch:  0.603
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12805495
time for this batch:  0.585
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14310677
time for this batch:  0.619
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13428456
time for this batch:  0.619
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.12750609
time for this batch:  0.642
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.12812465
time for this batch:  0.617
-----------------a batch ends---------------
train loss for this epoch:  0.131192
----------------validate-------------------
ave Recall 0.665316383837415
ave NDCG 0.5596052875331353
----------------test-------------------
ave Recall 0.6576609494682308
ave NDCG 0.5472056136712383
running time for this epoch:  41.855536460876465
running time until now:  3722.5271587371826
-------------------------an epoch ends ---------------------------
i_epoch:  77
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12909319
time for this batch:  0.59
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13042282
time for this batch:  0.614
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.13863851
time for this batch:  0.654
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.13575459
time for this batch:  0.624
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1255269
time for this batch:  0.611
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13040552
time for this batch:  0.606
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.12913042
time for this batch:  0.6
-----------------a batch ends---------------
train loss for this epoch:  0.130283
----------------validate-------------------
ave Recall 0.6707356773276891
ave NDCG 0.5656548118868017
----------------test-------------------
ave Recall 0.6603771851494664
ave NDCG 0.5502643743814501
running time for this epoch:  42.64535999298096
running time until now:  3765.1726081371307
-------------------------an epoch ends ---------------------------
i_epoch:  78
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.121602595
time for this batch:  0.565
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.13362285
time for this batch:  0.631
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12596416
time for this batch:  0.638
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.14215392
time for this batch:  0.661
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13873821
time for this batch:  0.609
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13979295
time for this batch:  0.631
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13355178
time for this batch:  0.596
-----------------a batch ends---------------
train loss for this epoch:  0.130976
----------------validate-------------------
ave Recall 0.6709021994456124
ave NDCG 0.5655290759745827
----------------test-------------------
ave Recall 0.6592201768640102
ave NDCG 0.5494757959404108
running time for this epoch:  43.02607870101929
running time until now:  3808.198818206787
-------------------------an epoch ends ---------------------------
i_epoch:  79
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.11878429
time for this batch:  0.587
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12654349
time for this batch:  0.605
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.12288368
time for this batch:  0.627
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.1575127
time for this batch:  0.647
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.13012607
time for this batch:  0.619
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.13729611
time for this batch:  0.664
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.13969326
time for this batch:  0.605
-----------------a batch ends---------------
train loss for this epoch:  0.130363
----------------validate-------------------
ave Recall 0.6698384595592916
ave NDCG 0.5679479921880661
----------------test-------------------
ave Recall 0.6626746743158325
ave NDCG 0.5530482845958751
running time for this epoch:  42.773990869522095
running time until now:  3850.972934961319
-------------------------an epoch ends ---------------------------
i_epoch:  80
----------------an epoch starts-------------------
# batch:  63
i_batch:  0.0
the loss is:  0.12779588
time for this batch:  0.56
-----------------a batch ends---------------
i_batch:  10.0
the loss is:  0.12304806
time for this batch:  0.522
-----------------a batch ends---------------
i_batch:  20.0
the loss is:  0.1263234
time for this batch:  0.622
-----------------a batch ends---------------
i_batch:  30.0
the loss is:  0.12860529
time for this batch:  0.606
-----------------a batch ends---------------
i_batch:  40.0
the loss is:  0.1266026
time for this batch:  0.614
-----------------a batch ends---------------
i_batch:  50.0
the loss is:  0.14162478
time for this batch:  0.617
-----------------a batch ends---------------
i_batch:  60.0
the loss is:  0.12781152
time for this batch:  0.609
-----------------a batch ends---------------
train loss for this epoch:  0.130753
----------------validate-------------------
ave Recall 0.6672120814394598
ave NDCG 0.5640620238526131
----------------test-------------------
ave Recall 0.6591763717669132
ave NDCG 0.5524001178510207
Early stop at the 81-th epoch
In [17]:
print ("start preparing for vali and test")
vali_u_v, vali_x_poi, vali_x_user, vali_x_adj, vali_y_real = prepare_validate_test(vali, hyper_param)
test_u_v, test_x_poi, test_x_user, test_x_adj, test_y_real = prepare_validate_test(test, hyper_param)
start preparing for vali and test
In [18]:
#8.4: validate and test the model
print ("---------------validation-------------------")
all_recall, all_ndcg, ave_recall, ave_ndcg, vali_output, vali_real =\
    validate_test(trained_model, hyper_param, vali_u_v, vali_x_poi, vali_x_user, vali_x_adj, vali_y_real, True)
print ("-----------finish model validation---------------")
---------------validation-------------------
ave Recall 0.6672120814394598
ave NDCG 0.5640620238526131
-----------finish model validation---------------
In [19]:
print ("---------------test-------------------")
all_recall, all_ndcg, ave_recall, ave_ndcg, test_output, test_real =\
    validate_test(trained_model, hyper_param, test_u_v, test_x_poi, test_x_user, test_x_adj, test_y_real, True)
print ("-----------finish model validation---------------")
---------------test-------------------
ave Recall 0.6591763717669132
ave NDCG 0.5524001178510207
-----------finish model validation---------------

9: save¶

In [20]:
list_vali_hat = vali_output.cpu().detach().numpy().tolist()
list_vali_real = vali_real.cpu().detach().numpy().tolist()
print(len(list_vali_hat))
print(len(list_vali_hat[0]))
print(len(list_vali_hat[0][0]))
print(len(list_vali_hat[0][0][0]))

list_test_hat = test_output.cpu().detach().numpy().tolist()
list_test_real = test_real.cpu().detach().numpy().tolist()
print(len(list_test_hat))
print(len(list_test_hat[0]))
print(len(list_test_hat[0][0]))
print(len(list_test_hat[0][0][0]))
18
1
1827
80
36
1
1827
80
In [21]:
result = {"vali_hat": list_vali_hat, "vali_real": list_vali_real, \
          "test_hat": list_test_hat, "test_real": list_test_real}

subfile = case+'/vali_predict.json'
savefile = open(subfile,'w')
json.dump(result, savefile)
savefile.close()

df = json.load(open(subfile))
df.keys()
print(len(df["test_real"]))
36
In [ ]: